import { onMounted, defineAsyncComponent } from "vue";
import { defineClientConfig } from "vuepress/client";
import { setupRunningTimeFooter } from "vuepress-theme-hope/presets/footerRunningTime.js";
const HeroBG = defineAsyncComponent(() => import("./components/BlogBg.vue"));
const NavMusic = defineAsyncComponent(() => import('./components/NavMusic.vue'));
import packageJson from '../../package.json';

export default defineClientConfig({
  // 你可以在这里覆盖或新增布局

  enhance: ({ app }) => {
  },
  setup: () => {
    onMounted(() => {
      console.log(
        `%c ✨YOLO的博客 v${packageJson.version}✨ %c ✨https://yslin1126.gitee.io/ Blog✨ %c\n`,
        `background: #eb507e; padding:5px; font-size:12px; color: #f9f4dc;`,
        `background: #030307; padding:5px; font-size:12px; color:#fff;`,
        `color: #51c4d3; font-size:12px;`
      );
    });
    setupRunningTimeFooter(
      new Date("2024-02-05"),
      {
        "/": "已运行 :day 天 :hour 小时 :minute 分钟 :second 秒",
      },
      true,
    );
  },
  rootComponents: [
    HeroBG,
    NavMusic,
  ],
});
